﻿#define _CRT_SECURE_NO_WARNINGS 1 // use for depreate the warning error of scanf

#include <stdio.h>

//打印名字和学号的函数
void PrintInfo(void)
{
	printf("My Name is : %s\n", "ZHANG");
	printf("My Student ID is : %s\n", "22156558");
}

int max(int x0, int x1, int x2, int x3, int x4)
{
	int i, m, b[5];
	m = b[0] = x0; b[1] = x1; b[2] = x2; b[3] = x3; b[4] = x4;
	for (i = 1; i < 5; i++)
		if (b[i] > m) m = b[i];
	return m;
}
void main() 
{
	int m, a[6] = { 23,45,89,12,34 };
	a[5] = max(a[0], a[1], a[2], a[3], a[4]);
	printf("The element with max value in array a is now placed in a[5], Its value is %d\n", a[5]);
}
